Filename | (eval 14)[rbm/lib/RBM.pm:39] |
Statements | Executed 65 statements in 2.63ms |
Eval Invoked At | /root/tor-browser-build/rbm/lib/RBM.pm line 39 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
15 | 1 | 1 | 741µs | 875ms | __ANON__[:16] | RBM::
15 | 1 | 1 | 466µs | 832ms | __ANON__[:10] | RBM::
1 | 1 | 1 | 14µs | 55µs | BEGIN@2.7 | RBM::
1 | 1 | 1 | 10µs | 33µs | BEGIN@28 | RBM::
0 | 0 | 0 | 0s | 0s | __ANON__[:23] | RBM::
0 | 0 | 0 | 0s | 0s | __ANON__[:41] | RBM::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # This part of the file contains options written in perl | ||||
2 | 2 | 905µs | 2 | 95µs | # spent 55µs (14+41) within RBM::BEGIN@2.7 which was called:
# once (14µs+41µs) by RBM::load_config_file at line 2 # spent 55µs making 1 call to RBM::BEGIN@2.7
# spent 41µs making 1 call to Exporter::import |
3 | ( | ||||
4 | var_p => { | ||||
5 | # runc100 is true if we are using runc >= 1.0.0 | ||||
6 | # we assume that any version that is not 0.1.1 is >= 1.0.0 | ||||
7 | # spent 832ms (466µs+831) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:10] which was called 15 times, avg 55.4ms/call:
# 15 times (466µs+831ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 55.4ms/call | ||||
8 | 15 | 68µs | 15 | 831ms | my ($out) = capture_exec('sudo', 'runc', '--version'); # spent 831ms making 15 calls to IO::CaptureOutput::capture_exec, avg 55.4ms/call |
9 | 15 | 542µs | 15 | 42µs | return !($out =~ m/^runc version 0.1.1/); # spent 42µs making 15 calls to RBM::CORE:match, avg 3µs/call |
10 | }, | ||||
11 | # runc_spec100 is true if runc spec is at least 1.0.0 | ||||
12 | # We will need to update this when there is a new spec version available | ||||
13 | # spent 875ms (741µs+874) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:16] which was called 15 times, avg 58.3ms/call:
# 15 times (741µs+874ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 58.3ms/call | ||||
14 | 15 | 72µs | 15 | 874ms | my ($out) = capture_exec('sudo', 'runc', '--version'); # spent 874ms making 15 calls to IO::CaptureOutput::capture_exec, avg 58.2ms/call |
15 | 15 | 903µs | 15 | 333µs | return $out =~ m/^.*spec: 1\.[0-9]+\.[0-9]+(?:-dev)?$/m; # spent 333µs making 15 calls to RBM::CORE:match, avg 22µs/call |
16 | }, | ||||
17 | nightly_torbrowser_version => sub { | ||||
18 | state $version = ''; | ||||
19 | return $version if $version; | ||||
20 | my (undef, undef, undef, $day, $mon, $year) = gmtime; | ||||
21 | $version = sprintf("tbb-nightly.%u.%02u.%02u", $year + 1900, $mon + 1, $day); | ||||
22 | return $version; | ||||
23 | }, | ||||
24 | nightly_torbrowser_incremental_from => sub { | ||||
25 | my ($project, $options) = @_; | ||||
26 | my $nightly_dir = project_config($project, 'basedir', $options) . '/nightly'; | ||||
27 | my $current_version = project_config($project, 'var/torbrowser_version', $options); | ||||
28 | 2 | 130µs | 2 | 57µs | # spent 33µs (10+24) within RBM::BEGIN@28 which was called:
# once (10µs+24µs) by RBM::load_config_file at line 28 # spent 33µs making 1 call to RBM::BEGIN@28
# spent 24µs making 1 call to Exporter::import |
29 | return [] unless -d $nightly_dir; | ||||
30 | my @dirs = sort map { $_->basename } path($nightly_dir)->children(qr/^tbb-nightly\./); | ||||
31 | my $nb_incr = project_config($project, ['var', 'max_torbrowser_incremental_from'], $options); | ||||
32 | my @res; | ||||
33 | while ($nb_incr > 0) { | ||||
34 | my $dir = pop @dirs; | ||||
35 | last unless $dir; | ||||
36 | next if $dir eq $current_version; | ||||
37 | $nb_incr--; | ||||
38 | push @res, $dir; | ||||
39 | } | ||||
40 | return [@res]; | ||||
41 | }, | ||||
42 | }, | ||||
43 | ) | ||||
44 | 1 | 12µs | |||
45 | ; |